package argo.hot100.special;

public class SortColors {
    public void sortColors(int[] nums) {
        int[] map = new int[3];
        for (int num : nums) {
            map[num]++;
        }
        int k = 0;
        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < map[i]; j++) {
                nums[k++] = i;
            }
        }
    }
}
